In general, video codecs process fixed-point data. Pixel values of an input image are converted from a floating point to a fixed-point through quantization. During the quantization, considerable losses occur due to precision loss.
According to the conventional art, a received high dynamic range (HDR) image includes 16-bit data captured in a linear light format in a 4:4:4 Red Green Blue (RGB) color space with floating point accuracy.
Data that constitutes an image is converted from a half-precision floating-point 4:4:4 RGB linear-light format to a single-precision floating-point 4:4:4 format and then mapped to an R′G′B′ value of a floating point format by using a perceptual quality (PQ) transfer function.
The mapped R′G′B′ value is converted to Y′CbCr color spaces in a floating point format. Further, the Y′CbCr (float) color spaces in a floating point format are converted to 10-bit fixed point format (Dy′DcbDcr). The 10-bit fixed point format (Dy′DcbDcr) is down-sampled from 4:4:4 to 4:2:0. The down-sampled data is encoded by an encoder. The encoder sends the encoded data in a bitstream to a decoder.
The decoder receives the encoded bitstream and up-samples the encoded bitstream from the 4:2:0 format to the 4:4:4 format. The up-sampled data in the 10-bit fixed point format (Dy′DcbDcr) is de-quantized to data of the Y′CbCr color space in the floating point format. The de-quantized data is converted from values of the Y′CbCr color space in the floating point format to R′G′B′ values. The R′G′B′ values may be converted from the single-precision floating-point format to the half-precision floating-point 4:4:4 RGB linear-light format and may be remapped to the values of the 4:4:4 RGB color space with floating point accuracy by using an inverse PQ transfer function. Data of the 4:4:4 RGB color space with floating point accuracy constitutes an output image.